pub mod term_req {
    use serde::{Deserialize, Serialize};
    use std::error::Error;

    #[derive(Serialize, Deserialize)]
    pub struct Event1Req {
        event: u32,
        version: String,
        note: String
    }

    
    impl Event1Req {
        pub fn new(version: String, note: String) -> Event1Req {
            Event1Req {
                event: 1,
                version: version,
                note: note
            }
        }
    
        pub fn pack(&self) -> Result<String, Box<dyn Error>> {
            let j = serde_json::to_string(self)?;
            Ok(j)
        }
    }

    pub fn universal(event: u32) -> Result<String, Box<dyn Error>> {
        let json_val = serde_json::json!({
            "event": event
        });
        let json_str = serde_json::to_string(&json_val)?;
        Ok(json_str)
    }
}

pub mod term_rsp {
    
}